home *** CD-ROM | disk | FTP | other *** search
- /*
- * %W% %E%
- *
- * Copyright (c) 1995, 1996 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Permission to use, copy, modify, and distribute this software
- * and its documentation for NON-COMMERCIAL purposes and without
- * fee is hereby granted provided that this copyright notice
- * appears in all copies. Please refer to the file "copyright.html"
- * for further important copyright and licensing information.
- *
- * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
- * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
- * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
- *
- * CopyrightVersion 1.1_pre-beta
- */
- package examples.stock;
-
- import java.rmi.*;
-
- /**
- * The StockWatch remote interface is used to register interest in
- * receiving stock updates.
- */
- public interface StockWatch extends java.rmi.Remote {
-
- /**
- * Request notification of stock updates.
- * @param stock the stock name
- * @param obj the remote object to be notified
- * @return the latest update of the stock
- * @exception StockNotFoundException if stock is not known
- * @exception RemoteException if some communication failure occurs
- */
- Stock watch(String stock, StockNotify obj)
- throws StockNotFoundException, RemoteException;
-
- /**
- * Cancel request for stock updates for a particular stock.
- * @param stock the stock name
- * @param obj the remote object canceling the notification
- * @exception RemoteException if some communication failure occurs
- */
- void cancel(String stock, StockNotify obj) throws RemoteException;
-
- /**
- * Returns an array of stock update information for the stocks
- * already registered by the remote object.
- * @param obj the remote object
- * @return the list of stocks, or null if obj is not watching any
- * stocks
- * @exception RemoteException if some communication failure occurs
- */
- Stock[] list(StockNotify obj) throws RemoteException;
-
- /**
- * Cancel all requests for stock updates for the remote object.
- * @param obj the remote object canceling the request
- * @exception RemoteException if some communication failure occurs
- */
- void cancelAll(StockNotify obj) throws RemoteException;
- }
-
-
-